package cn.smbms.service.user;

import java.util.List;

import cn.smbms.pojo.User;

public interface UserService {
    /**
     * 用户登录
     * @param userCode
     * @param userPassword
     * @return
     */
    public User login(String userCode, String userPassword) throws Exception;

    public int getUserCount(String queryUserName, int _queryUserRole);

    /**
     * 根据条件查询用户列表
     * @param queryUserName
     * @param queryUserRole
     * @return
     */
    public List<User> getUserList(String queryUserName, int queryUserRole, int currentPageNo, int pageSize);

    /**
     * 增加用户信息
     * @param user
     * @return
     */
    public boolean add(User user);

    /**
     * 修改用户信息
     * @param user
     * @return
     */
    public boolean update(User user);

    /**
     * 根据ID查找user
     * @param id
     * @return
     */
    public User getUserById(Integer id);

    /**
     * 根据userCode查询出User
     * @param userCode
     * @return
     */
    public User selectUserCodeExist(String userCode) throws Exception;
}
